<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0048)./OrderUserEdit.html -->
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>
    榆林科技馆内容页
</title>
    <link rel="stylesheet" type="text/css" href="/css/reset.css">
    <link rel="stylesheet" type="text/css" href="/css/main.css">
    <script type="text/javascript" src="./js/adddate.js.下载"></script>
    <script type="text/javascript" src="/js/vue2.min.js"></script>
    <script type="text/javascript" src="/js/axios.min.js"></script>
    <script type="text/javascript" src="/js/jquery.min.js"></script>
    <script type="text/javascript" src="/js/jquery.SuperSlide.js"></script>
    <script language="javascript">
        function clic() {
            var a = document.getElementById("dd");
            a.style.display = 'none';

        }
        function Teamclic() {
            var a = document.getElementById("dd");
            a.style.display = 'block';

        }
        function isCardNo(card) {
            // 身份证号码为15位或者18位，15位时全为数字，18位前17位为数字，最后一位是校验位，可能为数字或字符X
            var cd = card.value;
            var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
            if (reg.test(cd) === false) {
                card.value = "";
                alert("身份证输入不合法");
                return false;
            }
        }
        function doValidate(phoneNum) {
            var phoneNumReg = /(^[0-9]{3,4}\-[0-9]{7}$)|(^[0-9]{7}$)|(^[0-9]{3,4}[0-9]{7}$)|(^0{0,1}13[0-9]{9}$)/
            //var phoneNumReg = /(^(?<国家代码>(\+86)|(\(\+86\)))?\D?(?<电话号码>(?<三位区号>((010|021|022|023|024|025|026|027|028|029|852)|(\(010\)|\(021\)|\(022\)|\(023\)|\(024\)|\(025\)|\(026\)|\(027\)|\(028\)|\(029\)|\(852\)))\D?\d{8}|(?<四位区号>(0[3-9][1-9]{2})|(\(0[3-9][1-9]{2}\)))\D?\d{7,8}))(?<分机号>\D?\d{1,4})?$)/
            if (!phoneNumReg.test(phoneNum.value)) {
                phoneNum.value = "";
                alert('请填写正确电话号码!!');
                return false;
            }
        }

    </script>
</head>
<body>
<form name="form1" method="post" action="/person?action=updPerson" id="form1">

    <!--条件检索-->
    <div class="main_box">
        <div class="side_here">
            <p>
                <a href="./OrderUserEdit.html#" title="首页"></a>当前位置 &gt; <span>会员信息管理</span> &gt; <span>会员管理</span></p>
        </div>
        <div class="kong">
        </div>
        <!--公用位置导航结束-->
        <div class="cont_box" id="person">
            <p class="title_bt">
                会员信息修改</p>
            <div class="biaodan_list">
                <input name="pid" type="hidden" v-model="people.pid">
                <table class="table_biaodan" border="0" cellspacing="0" cellpadding="0">
                    <tbody>
                    <tr>
                        <td class="biaodan_name">
                            <i>*</i>姓名：
                        </td>
                        <td class="biaodan_enter">
                            <input name="txtUName" v-model="people.pName" type="text" id="txtUName" class="input">
                        </td>
                    </tr>
                    <tr>
                        <td class="biaodan_name">
                            <i>*</i>身份证：
                        </td>
                        <td class="biaodan_enter">
                            <input name="txtUidentity" v-model="people.idCard" type="text" id="txtUidentity" class="input" onblur="isCardNo(this)">
                        </td>
                    </tr>
                    <tr>
                        <td class="biaodan_name">
                            <i>*</i>电话：
                        </td>
                        <td class="biaodan_enter">
                            <input name="txtUTel" v-model="people.pTel" type="text" id="txtUTel" class="input" onblur="doValidate(this)">
                        </td>
                    </tr>
                    <tr id="Hidd">
                        <td class="biaodan_name">
                            用户类型：
                        </td>
                        <td class="biaodan_enter">
                            <input value="1" name="Fruit" v-model="people.ptID" type="radio" id="sole" class="dxbton" onclick="clic()" checked="checked"><span>个人</span>
                            <input value="2" name="Fruit" v-model="people.ptID" type="radio" id="team" class="dxbton" onclick="Teamclic()"><span>企业</span>
                        </td>
                    </tr>
                    <tr id="dd" style="display: none;">
                        <td class="biaodan_name">
                            <i>*</i>团体名称：
                        </td>
                        <td class="biaodan_enter">
                            <input name="txtUteamname" v-model="people.organize" type="text" id="txtUteamname" class="input">
                        </td>
                    </tr>

                    </tbody>
                </table>
                <div class="anniu1" style="margin-left:300px;margin-top:20px;display: block;">
                    <input type="submit" name="add" value="修改" id="add" class="btn btn-secondary radius">
                    <input type="submit" name="Button1" value="取消" id="Button1" class="btn btn-default radius">
                </div>
            </div>
            <!--表单提交结束-->

        </div>
    </div>
</form>

<script>
    var person = new Vue({
        el:"#person",
        data:{
            people:{
                "pid":1,
                "pName":"测试",
                "idCard":"1111",
                "pTel":"2222",
                "ptID":1,
                "ptName":"团体用户",
                organize:"测试部"
            }
        }
    });
    window.onload = init;
    function init() {
        // alert(window.location.search);
        var url = "/person"+ window.location.search + "&action=findPersonById";
        axios.get(url)
            .then(res=>{
                person.people = res.data;
                // alert(person.people.ptID);
            });
    }
</script>
</body></html>